/* 
 * File:   EvolutiveSimulationThread.h
 * Author: jcrada
 *
 * Created on April 11, 2009, 3:23 PM
 */

#ifndef _EVOLUTIVESIMULATIONTHREAD_H
#define	_EVOLUTIVESIMULATIONTHREAD_H

#include "SimulationThread.h"
#include "EvolutionOfCreatures.h"
namespace jcrada {

    class EvolutiveSimulationThread : public SimulationThread {
    private:
        EvolutionOfCreatures* _evolution;
        int _seconds_for_stabilization;

    protected:
        virtual void iterate();
        virtual void stabilize(Creature& creature);

    public:
        EvolutiveSimulationThread(BulletSimulator& simulator = BulletSimulator::getSingleton());
        virtual ~EvolutiveSimulationThread();
        

        virtual void setEvolution(EvolutionOfCreatures* evolution) {
            this->_evolution = evolution;
        }

        virtual EvolutionOfCreatures* getEvolution() const {
            return this->_evolution;
        }

        virtual void setSecondsForStabilization(int seconds) {
            this->_seconds_for_stabilization = seconds;
        }

        virtual int getSecondsForStabilization() const {
            return this->_seconds_for_stabilization;
        }
    };
}

#endif	/* _EVOLUTIVESIMULATIONTHREAD_H */

